<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/page/inc/taglib.jsp"%>
<div class="pageHeader">
	<form id="pagerForm" onsubmit="return navTabSearch(this);" action="${pageContext.request.contextPath}/statistics/cardRecharge/list" method="post">
		<!-- 分页表单参数 -->
		<%@include file="/WEB-INF/page/inc/pageForm.jsp"%>
		<!-- 需要排序的字段 -->
		<input type="hidden" name="orderField" value="${requestScope.dwzPageBean.countResultMap.orderField}" />
		<!-- 正序倒序 -->
		<input type="hidden" name="orderDirection" value="${requestScope.dwzPageBean.countResultMap.orderDirection}" />
		<div class="searchBar">
			<table class="searchContent">
				<tr>
					<td>店铺：<input type="text" name="shopName" value="${requestScope.dwzPageBean.countResultMap.shopName}" placeholder="输入店铺名"></td>
					<td>会员卡类型：<input type="text" name="cardType" value="${requestScope.dwzPageBean.countResultMap.cardType}" placeholder="输入类型"></td>
					<td>
						<span>时间范围：</span>
						<input type="text" name="startTime" class="date" placeholder="开始时间" readonly="true" value="<fmt:formatDate value="${requestScope.dwzPageBean.countResultMap.startTime}" pattern="yyyy-MM-dd" />" />
						<span>～</span>
						<input type="text" name="endTime" class="date" placeholder="结束时间" readonly="true" value="<fmt:formatDate value="${requestScope.dwzPageBean.countResultMap.endTime}" pattern="yyyy-MM-dd" />" />
					</td>
				</tr>
			</table>
			<div class="subBar">
				<ul>
					<li>
						<div class="buttonActive">
							<div class="buttonContent">
								<button type="submit">查询</button>
							</div>
						</div>
					</li>
				</ul>
			</div>
		</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<shiro:hasPermission name="/statistics/cardRecharge/excel">
			<li class=""><a class="icon" href="${pageContext.request.contextPath}/statistics/cardRecharge/excel" target="dwzExport" targettype="navTab" title="实要导出这些记录吗?"><span>导出EXCEL</span></a></li>
			</shiro:hasPermission>
		</ul>
	</div>
	<table class="table" targetType="navTab" asc="asc" desc="desc" width="100%" layoutH="138">
		<thead>
			<tr>
				<th width="22"><input type="checkbox" group="id" class="checkboxCtrl"></th>
				<th orderField="cr.shop_id" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'cr.shop_id'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>店铺</th>
				<th orderField="cr.recharge_money" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'cr.recharge_money'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>充值金额</th>
				<th orderField="m.member_name" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'm.member_name'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>会员名</th>
				<th orderField="m.member_sex" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'm.member_sex'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>性别</th>
				<th orderField="m.member_phone" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'm.member_phone'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>手机号</th>
				<th orderField="mc.member_card_num" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'mc.member_card_num'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>会员卡号</th>
				<th orderField="ct.type_name" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'ct.type_name'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>会员卡类型</th>
				<th orderField="ct.discount" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'ct.discount'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>卡折扣</th>
				<th orderField="op.pay_type" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'op.pay_type'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>支付类型</th>
				<th orderField="cr.add_time" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'cr.add_time'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>时间</th>
				<th orderField="se.employee_name" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'se.employee_name'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>操作人</th>
			</tr>
		</thead>
		<tbody>
			
				<c:if test="${requestScope.dwzPageBean != null &&  requestScope.dwzPageBean.recordList != null }">
					<c:forEach var="record" items="${requestScope.dwzPageBean.recordList}" varStatus="status">
						<tr >
							<td><input name="id" value="${record.cardRechargeId}" type="checkbox"></td>
							<td>${record.shopName}</td>
							<td><fmt:formatNumber value="${record.rechargeMoney}" pattern="0.0#" /></td>
							<td>${record.memberName}</td>
							<td>${record.memberSex==0?"女":"男"}</td>
							<td>${record.memberPhone}</td>
							<td>${record.memberCardNum}</td>
							<td>${record.typeName}</td>
							<td>${record.discount}%</td>
							<td><!--0微信支付 1支付宝支付 2现金 3会员卡支付-->
								<c:if test="${record.payType==0}">微信</c:if>
								<c:if test="${record.payType==1}">支付宝</c:if>
								<c:if test="${record.payType==2}">现金</c:if>
								<c:if test="${record.payType==3}">会员卡</c:if>
							</td>
							<td><fmt:formatDate value="${record.addTime}" pattern="yyyy-MM-dd  HH:mm:ss"/></td>
							<td>${record.employeeName}</td>
						</tr>
					</c:forEach>
				</c:if>
			
		</tbody>
	</table>
	<!-- 分页条 -->
	<%@include file="/WEB-INF/page/inc/pageBar.jsp"%>
</div>